package com.fishingwithme.domain.circle;

import com.fishingwithme.domain.common.Location;
import cn.fishingwithme.infrastructure.dtos.circle.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.fishingwithme.infrastructure.dtos.circle.*;

import java.util.List;

public interface CircleService {
    Boolean deleteCircle(Long circleId);

    Boolean add(CircleDto circle);

    List<CircleDto> getCircles(Location location, Integer distance);

    Boolean active(Long circleId);

    Boolean isActive(Long circleId);

    Boolean markActive(Long circleId, Boolean active);

    List<CircleLocationDto> getCircleLocations(Double latitude, Double longitude, Integer defaultCircleDistance);

    void addSpotToCircle(Long circleId, Long spotId);

    List<CircleSpotDto> queryCircleSpots(Long circleId, String queryStr);

    void scheduleCircleMessage();

    IPage<CircleDto> list(Integer pageNum, Integer pageSize);

    IPage<CirclePageDto> listPage(Integer pageNum, Integer pageSize);

    CircleDetailDto get(Long id);

    Boolean updateCircle(CircleUpdateDto updateDto);
    
    /**
     * 批量将spot关联到圈子
     * @param circleId 圈子ID
     * @param spotIds spot ID列表
     * @return 成功关联的数量
     */
    Integer batchAddSpotsToCircle(Long circleId, List<Long> spotIds);
    
    /**
     * 分页查询指定圈子的spot列表
     * @param pageNum 页码
     * @param pageSize 每页数量
     * @param circleId 圈子ID
     * @return 分页结果
     */
    IPage<SpotInCircleDto> getCircleSpotsPage(Integer pageNum, Integer pageSize, Long circleId);

    CityDto getCity(Double latitude, Double longitude);
}
